package com.starlink.model.util;

import com.starlink.model.dtomapper.DepositPriceSetDtoMapper;
import com.starlink.model.domain.DepositPriceSetDO;
import com.starlink.model.vo.DepositPriceSetVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class DepositPriceSetConvert {

    public static List<DepositPriceSetVO> buildDepositPriceSetVoList(List<DepositPriceSetDO> depositPriceSetDOList) {
        if (CollectionUtils.isEmpty(depositPriceSetDOList)) {
            return Lists.newArrayList();
        }
        List<DepositPriceSetVO> depositPriceSetVOList = new ArrayList<>();
        for (DepositPriceSetDO depositPriceSetDO : depositPriceSetDOList) {
            depositPriceSetVOList.add(DepositPriceSetDtoMapper.INSTANCE.do2VO(depositPriceSetDO));
        }

        return depositPriceSetVOList;
    }
}
